package vfs.obj.entity;

import java.util.Date;

/**
 * A VFSNode is the building block of the virtual folder system.  It can
 * represent a folder capable of containing other nodes, or it can represent
 * a link to a specific file on a remote machine.
 * 
 * @author Matthew Eavenson <durandal@uga.edu>
 */
public interface VFSNode extends VFSEntity{
    
    /**
     * PublicAccess denotes what level of security a particular node
     * should have with respect to public users being able to access or
     * modify it.  Possible values are "READ", "WRITE", or "NONE".
     * 
     * @author Matthew Eavenson <durandal@uga.edu>
     */
    public enum PublicAccess{
        NONE,
        READ,
        WRITE
    }
    
    /**
     * Returns this node's name.  Acts as the file or folder name
     * in the system.
     * 
     * @return this node's name
     */
    String getName();
    
    /**
     * Sets this node's name.
     * 
     * @param name the name to assign to this node
     */
    void setName(String name);
    
    /**
     * Returns the date that this node was created.
     * 
     * @return this node's creation date
     */
    Date getCreationDate();
    
    /**
     * Returns the date that this node was last modified.
     * 
     * @return this node's last modified date
     */
    Date getModifiedDate();
    
    /**
     * Sets this node's last modified date.
     * 
     * @param modifiedDate the date to assign as the last modified date
     */
    void setModifiedDate(Date modifiedDate);
    
    /**
     * Returns the external location that this node maps to.
     * 
     * @return this node's reference to an external file
     */
    String getLocation();
    
    /**
     * Sets this node's reference to an external file.
     * 
     * @param location the reference to an external file
     */
    void setLocation(String location);
    
    /**
     * Returns this node's ability to be accessed or modified by users in general.
     * 
     * @return this node's public access level
     */
    PublicAccess getPublicAccess();
    
    /**
     * Sets this node's ability to be accessed or modified by users in general.
     * 
     * @param access the access level to assign to this node
     */
    void setPublicAccess(PublicAccess access);
    
}
